<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head th:replace="~{fragments/header :: header}">
</head>
<body class="blog-font">

<!-- Page content -->
<div class="container blog-content-container">


    <h3 th:text="${userModel.title}">matrix</h3>
    <div>
        <a class="btn btn-default" href="/users/form.html" th:href="@{/users/form}">创建用户</a>
    </div>
    <table class="table table-hover">
        <thead>
        <tr>
            <td>ID</td>
            <td>Email</td>
            <td>Name</td>
        </tr>

        </thead>
        <tbody>
        <tr th:if="${userModel.userList.size()} eq 0">
            <td colspan="3">没有用户信息!</td>
        </tr>

        <tr th:each="user : ${userModel.userList}">
            <td th:text="${user.id}"></td>
            <td th:text="${user.email}"></td>
            <td><a th:href="@{'/users/' + ${user.id}}" th:text="${user.name}"></a></td>
        </tr>

        </tbody>
    </table>
</div> <!-- /.container-->
<div th:replace="~{fragments/footer :: footer}"></div>

</body>
</html>
